package cn.skyisazure.metacompare.sqlcompare.utils;

import cn.skyisazure.metacompare.sqlcompare.enums.DdlExecuteTag;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author wangjj
 * @date 2024/4/12 14:25
 */
@Data
@Accessors(chain = true)
public class ChangeSqlModel {
    /** ddl语句 */
    private String sql;
    /** 标记（若有该标记，则说明该ddl可能执行不会成功，需要提前验证） */
    private DdlExecuteTag[] tag = {DdlExecuteTag.NON};
    /** 生成ddl的BO对象，用来生成检测数据逻辑 */
    private Object modelBO;

    public ChangeSqlModel(String sql, Object modelBO, DdlExecuteTag... tag) {
        this.sql = sql;
        this.modelBO = modelBO;
        this.tag = tag;
    }
    public ChangeSqlModel(String sql) {
        this.sql = sql;
    }
}
